<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>邮箱验证</title>
	</head>
	<body>
		<input name="aa" type="button" value="验证" onclick="yanzheng()" />
		<script type="text/javascript">
			function yanzheng(){
				var Count = prompt("请输入邮箱地址：","");
				if(Count.length>0){
					if((Count.indexOf("@")!=-1)&&(Count.indexOf(".")!=-1)){
						if((Count.indexOf("susan@sohu.com"))!=-1){
							alert("邮箱地址正确,邮箱名称是：susan");
							return
						}
						else{
							alert("邮箱地址错误");
						return;
						}
					}else{
						alert("邮箱地址必须包含@和.");
						return;
					}
				}
				else{
					alert("邮箱地址不能为空！")
						return;
				}
				}
				
		</script>
	</body>
</html>
